<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<!DOCTYPE html>
<html>
<head>
    <title></title>
<script type="text/javascript" src="<%=path%>/components/jquery/jquery-1.10.2.js"></script>
<script type="text/javascript" src="<%=path%>/components/select/bootstrap-select.js"></script>
<link rel="stylesheet" type="text/css"  href="<%=path%>/components/select/bootstrap-select.css"/>
<link rel="stylesheet" type="text/css" href="<%=path%>/components/bootstrap/css/bootstrap.min.css" />
<script type="text/javascript" src="<%=path%>/components/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript">
    function addProgress(){
        var projectID=$("#projectID").val();
        window.location.href="goToAdd.do?projectID="+projectID;
    }
    function complaint(){
        window.location.href="<%=path%>/complaint/goToPage.do";
    }
    function select(){
        window.location.href="<%=path%>/progress/goToProgress.do";
    }
</script>
</head>
<body>
 <div class="container">
     <ul class="nav nav-pills">
      <li class="active label-info"><a href="javascript:void(0);" onClick="select()">选择项目</a></li>
      <li class="active"><a href="javascript:void(0);" onClick="addProgress()">施工进度</a></li>
      <li class="active"><a href="javascript:void(0);" onClick="complaint()">我要投诉</a></li>
    </ul>
 </div>
  <div class="container">
  <c:if test="${!empty project }">
  <div>小区:${project.communityName},门牌号:${project.communityNum},合同号:${project.contractNum}</div>
   <input type="hidden" id="projectID" value="${project.projectID}">
  </c:if>
  <c:if test="${!empty progressList}">
        <table class="table table-bordered">
            <c:forEach var="progressListVo" items="${progressList}">
                <tr>
                    <td width="10%" style="text-align: right;">
                        <h3><span class="label label-default">${progressListVo.time}</span></h3>
                    </td>
                    <td width="80%">
                       <c:forEach var="detail" items="${progressListVo.list}">
                              <div class="panel panel-default">
                                  <div class="panel-heading">
                                      <h4>${detail.userName}<small>${detail.roleName}</small></h4>
                                  </div>
                                  <div class="panel-body">
                                      <p>
                                            <c:forEach var="fileUrl" items="${detail.fileUrls}">
                                                <img  class="img-rounded" src="<%=basePath%>${fileUrl}" style="width: 120px;height:120px">
                                            </c:forEach>
                                        </p>
                                        <p>${detail.progressInfo}</p>
                                  </div>
                            </div>
                      </c:forEach>
                    </td>
                </tr>
            </c:forEach>
        </table>
        </c:if>
  </div>

</body>
</html>
